package com.qqt.csr.ixport.vo.resp;

import com.qqt.csr.ixport.enums.TaskStatus;
import com.qqt.csr.ixport.enums.TaskType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: yang hao
 * @Date: 2025/1/20 10:05
 * @Description: 批量导入任务返回参数
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "ImportTaskInfoRespVO", description = "批量导入任务返回参数")
public class ImportTaskInfoRespVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Schema(description = "任务id")
    private Long id;


    @Schema(description = "任务名称")
    private String name;

    /**
     * 任务类型：SW 敏感词导入
     */
    @Schema(description = "任务类型：SENSITIVE_WORDS 敏感词导入")
    private TaskType type;

    /**
     * 任务状态：0 未开始；1 进行中；2 暂停；3 成功；4 失败；5 取消；6  回滚中；7 回滚成功；8 回滚失败
     */
    @Schema(description = "任务状态：UN_START 未开始；RUNNING 进行中；PAUSE 暂停；SUCCESS 成功；FAIL 失败；CANCEL 取消；ROLLING_BACK  回滚中；ROLLBACK_SUCCESS 回滚成功；ROLLBACK_FAIL 回滚失败")
    private TaskStatus status;

    /**
     * 失败原因
     */
    @Schema(description = "失败原因")
    private String failReason;

    /**
     * 数据源下载地址
     */
    @Schema(description = "数据源下载地址")
    private String dataSourceDownUrl;

    /**
     * 总条数
     */
    @Schema(description = "总条数")
    private Integer dataTotal;

    /**
     * 已完成条数
     */
    @Schema(description = "已完成条数")
    private Integer successCount;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "创建人")
    private String creatorName;
}
